﻿using Essensoft.Paylink.WeChatPay.V2.Notify;
using Shop.Core.Share;
using Shop.Core.YOP;
using Shop.Model.Dto.Orders;

namespace Shop.IServices
{
    /// <summary>
    /// 支付接口
    /// </summary>
    public interface IPaymentAppService : IAppService
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<AppResult<object>> Pay(PayDto input);

        /// <summary>
        /// 微信支付回调
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task WechatPayNotify(WeChatPayUnifiedOrderNotify input);


        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        Task<AppResult> YopPayNotify(NotifyDto input);

        /// <summary>
        /// 易宝转账通知
        /// </summary>
        /// <returns></returns>
        Task<AppResult> YopTransferCallBack(NotifyDto input);

        /// <summary>
        /// 结算
        /// </summary>
        /// <param name="orderId"></param>
        /// <returns></returns>
        Task Settlement(long orderId);

        /// <summary>
        /// 完成订单支付
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        AppResult AdminPay(AdminPayDto dto);
    }
}
